using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Runtime.Serialization;

namespace WSBanking.DTO
{
	/// <summary>
	/// Data transfer object which is associated with SEBanking_Exchange table in database
	/// </summary>
	[DataContract]
	public class SEBanking_ExchangeDTO
	{
		[DataMember]
		public int Exc_ID { get; set; }
		[DataMember]
		public string Card_ID_Send { get; set; }
		[DataMember]
		public string Card_ID_Receive { get; set; }
		[DataMember]
		public decimal Exc_Balance { get; set; }

		public static SEBanking_ExchangeDTO Translate(DataRow row)
		{
			var dto = new SEBanking_ExchangeDTO
			{
				Exc_ID = int.Parse(row["Exc_ID"].ToString()),
				Card_ID_Send = row["Card_ID_Send"].ToString(),
				Card_ID_Receive = row["Card_ID_Receive"].ToString(),
				Exc_Balance = decimal.Parse(row["Exc_Balance"].ToString()),
			};
			return dto;
		}
	}
}